<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="test"></div>
		<button onclick="fun()">点击</button>
		
		<script src="../js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			/*
			 window.onload = function() {
				var domObj = document.getElementById('test');
				domObj.innerHTML = '<span style="color: red;">Hello JQuery</span>';
				console.log(domObj.innerHtml);
			} */
			
			$(function() {
				// jQuery返回的div这个对象
				var jQueryObj = $('#test');
				jQueryObj.html('<span style="color: red;">Hello JQuery</span>');
				
			});
			
			function fun() {
				//var jQueryObj = $('#test');
				//var value = jQueryObj.html();
				var value = $('#test').html();
				console.log(value);
			}
		</script>
	</body>
</html>
